package com.example.leetcode;

public class Concatenation {
    public static int[] getConcatenation(int[] nums) {
        int l = nums.length;
        int[] ans = new int[2 * l];
        System.arraycopy(nums, 0, ans, 0, l);
        System.arraycopy(nums, 0, ans, l, l);
        return ans;
    }

    public static void main(String[] args) {
        int[] nums = new int[]{15, 7, 11, 2};
        int[] concatenation = getConcatenation(nums);
        for (int i : concatenation) {
            System.out.println(i);
        }

    }
}
